package xdu.lz.stage2_design_pattern.chapter3_observer_pattern.observerApp2;


//这是观察者的接口
public abstract class WeatherObserver {

	//维护一个主题的 WeatherStation引用
	protected WeatherStationSubject weatherStation;

	public WeatherObserver(WeatherStationSubject weatherStation) {
		this.weatherStation = weatherStation;
		//自动把订阅该主题的观察者加到集合
		weatherStation.observerList.add(this);
	}

	abstract void notifyWeather(String weather);

}
